﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;
using System.Device.Location;
using Sisocana.PhoneApp.MobileServices;

namespace Sisocana.PhoneApp
{
    public class HelpRequestForm
    {
        private static int _catastropheId;
        private static string _catastropheName;
        private static string _firstName;
        private static string _lastName;
        private static string _situationDescription;

        private static DataImagen _imagenPersona;
        private static GeoCoordinate _location;
       
        public static string FirstName {
            get { return HelpRequestForm._firstName; }
            set { HelpRequestForm._firstName = value; }
        }

        public static string LastName {
            get { return HelpRequestForm._lastName; }
            set { HelpRequestForm._lastName = value; }
        }

        public static string SituationDescription {
            get { return HelpRequestForm._situationDescription; }
            set { HelpRequestForm._situationDescription = value; }
        }

        public static int CatastropheId
        {
            get { return HelpRequestForm._catastropheId; }
            set { HelpRequestForm._catastropheId = value; }
        }

        public static string CatastropheName {
            get { return HelpRequestForm._catastropheName; }
            set { _catastropheName = value; }
        }

        public static DataImagen ImagenPersona
        {
            get { return HelpRequestForm._imagenPersona; }
            set { HelpRequestForm._imagenPersona = value; }
        }

        public static GeoCoordinate Location
        {
            get { return HelpRequestForm._location; }
            set { HelpRequestForm._location = value; }
        }

        public static HelpRequest Message
        {
            get
            {
                return new HelpRequest()
                {
                    catastropheId = CatastropheId,
                    firstName = FirstName,
                    lastName = LastName,
                    situationDescription = SituationDescription,
                    image = ImagenPersona,
                    latitude = Location.Latitude.ToString(),
                    longitude = Location.Longitude.ToString()
                };
            }
        }
    }
}
